﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace TheVerge.Base
{
    [DataContract]
    public class VideoEntry : Entry
    {
        [DataMember(Name="has_photo")]
        public bool HasPhoto { get; set; }

        [DataMember(Name="mp4_link")]
        public string VideoUrl { get; set; }

        [DataMember(Name="label")]
        public string Label { get; set; }

        [IgnoreDataMember]
        public string PhotoUrl
        {
            get
            {
                if (HasPhoto)
                    return API.GetImage(this, 66, 66);
                else
                    return string.Empty;
            }
        }
    }
}
